package edu.gatech.cs2340.teamrocket.model.pokemon.ailments;

import edu.gatech.cs2340.teamrocket.model.pokemon.Pokemon;

/**
 * Represents a Burn status ailment.
 *
 * @author Joe Tacheron
 */
public class Burn implements Ailment {

    private static final int DAMAGE = Pokemon.MAX_HEALTH / 8;

    /**
     * Lose 1/8 of maximum health.
     *
     * @param t
     * @return
     */
    @Override
    public String affect(Pokemon t) {
        t.takeDamage(DAMAGE);
        if(t.isFainted())
            return faintMessage(t);
        else
            return null;
    }

    @Override
    public String catchMessage(Pokemon t) {
        return t + "is now burned!";
    }

    @Override
    public String healMessage(Pokemon t) {
        return t + " is no longer burned!";
    }

    @Override
    public String faintMessage(Pokemon t) {
        return t + " fainted from his burn!";
    }

    /**
     *
     * @return true
     */
    @Override
    public boolean healedByFullHeal() {
        return true;
    }

    @Override
    public String hurtMessage(Pokemon t) {
        return t + " was hurt by its burn!";
    }

    /**
     *
     * @return "BRN" colored red
     */
    @Override
    public String statusString() {
        return "<span color='red'>BRN</span>";
    }
}
